﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IServiceCharge
    {       
        [OperationContract]
        ServiceChargeInfo ServiceCharge_GetInfo(int ServiceChargeID);

        [OperationContract]
        DataSet ServiceCharge_GetList( out int ItemCount,int currentPage, int pageSize);

        [OperationContract]
        int ServiceCharge_Insert(ServiceChargeInfo Info);

        [OperationContract]
        bool ServiceCharge_Update(ServiceChargeInfo Info);

        [OperationContract]
        bool ServiceCharge_Delete(int ServiceChargeID);

        [OperationContract]
        bool ServiceCharge_Exist(int _ID, DateTime _Date);

        [OperationContract]
        DataSet ServiceCharge_GetOne(int ServiceChargeID);

        [OperationContract]
        bool ServiceCharge_Calculate(int ServiceChargeID, DateTime Date, Decimal Amount);

        [OperationContract]
        bool ServiceCharge_DeleteDetail(int ServiceChargeID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class ServiceChargeInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        DateTime _Date;
        [DataMember]
        public DateTime Date
        {
            get { return _Date; }
            set { _Date = value; }
        }

        decimal _TotalAmount;
        [DataMember]
        public decimal TotalAmount
        {
            get { return _TotalAmount; }
            set { _TotalAmount = value; }
        }
        int _TotalEmployee;
        [DataMember]
        public int TotalEmployee
        {
            get { return _TotalEmployee; }
            set { _TotalEmployee = value; }
        }
        decimal _TotalWorkDays;
        [DataMember]
        public decimal TotalWorkDays
        {
            get { return _TotalWorkDays; }
            set { _TotalWorkDays = value; }
        }
        decimal _TotalAbsentDays;
        [DataMember]
        public decimal TotalAbsentDays
        {
            get { return _TotalAbsentDays; }
            set { _TotalAbsentDays = value; }
        }
        string _Description;
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }
    }
   
}
